<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| This file is where you may define all of the routes that are handled
| by your application. Just tell Laravel the URIs it should respond
| to using a Closure or controller method. Build something great!
|
*/
Route::get('', function () {
    return view('welcome');
});
//网站入口文件=======================================
Route::get('/',function(){
	return view('index');
});


/***************************前台部分***************************前台部分******************************/
//前台主页路由=======================================
Route::get('/home','home\IndexController@index');
// 	function(){
// 	return view('home\index');
// });
//前台支付============
Route::resource("/home/pay","home\PayController");
//前台购物车部分路由================================
Route::resource('/home/car','home\CarController');
Route::post('/home/carajax','home\CarController@doAjax');
Route::post('/home/caredit','home\CarController@doEdit');
//前台问题反馈========================================
Route::resource('home/issue','home\IssueController');
Route::post('home/issuemit','home\IssueController@storemit');
//前台云服务=======================================
Route::resource('/home/cloud','home\CloudController');
// 通讯录
Route::resource('/home/addre','home\AddreController');
// 云相册
Route::resource('/home/photo','home\PhotoController');
// //我的足迹==================================
Route::resource('home/foot', 'home\FootController');
//验证码
Route::get("/capch/{tmp}","login\loginController@capch");
//前台登录路由===============================================
Route::get("home/login","login\loginController@index");
Route::post("home/login","login\loginController@dologin");
//前台退出登录路由===========================================
Route::get("home/outlogin","login\loginController@outlogin");
//前台注册路由=============================================
Route::get("home/sign","login\loginController@sign");
Route::post("home/sign","login\loginController@create");
//前台个人中心路由==========================================
Route::get("/home/info","home\InfoController@index");
Route::get("/home/xg","home\InfoController@xg");
Route::post("/home/xg","home\InfoController@update");
//前台订单路由==============================================
Route::get("/home/order","home\OrderController@index");
Route::delete("/home/order/{tmd}","home\OrderController@destroy");
// 商品详情路由========================================================
// 小米手机详情路由====================================================
Route::get('/home/detxiaomi5splus','home\DetailsController@xiaomi5splus');
// 红米手机购买详情路由==================================================
Route::get('/home/dethongmi','home\DetailsController@hongmi');
Route::get('/home/hongmilogin','home\PurController@hongmilogin');
// 手机参数============================================================
Route::get('/home/param','home\DetailsController@param');
// 商品购买路由========================================================
// 小米5s购买路由=======================================================
Route::get('/home/purxiaomi5splus','home\PurController@xiaomi5splus');
Route::post('/home/purlogin','home\PurController@purlogin');
Route::get('/home/seek','home\SeekController@index');
//前台个人中心
Route::get("home/info","home\InfoController@index");
Route::get("home/xg","home\InfoController@xg");
Route::post("home/xg","home\InfoController@update");
Route::post("home/grtx","home\InfoController@grtx");
//前台填写订单
Route::resource("home/txdd","home\TxddController");
Route::get("home/ajax","home\TxddController@ajax");
//前台订单
Route::get("home/order","home\OrderController@index");
// 前台miui路由
Route::resource("/home/miui","home\MiuiController");
// 前台米聊路由
Route::resource("/home/miliao","home\MiliaoController");
//前台小米移动版路由
Route::resource("/home/yidong","home\YidongController");
//前台评论
Route::resource("home/pilun","home\PilunController");

/**************************后台部分***************************后台部分*********************************/
//显示后台主页路由=======================================
// Route::get('/admin',function(){
// 	return view('admin\index');
// });
//后台网站管理(前台)路由=======================================
Route::get('admin/logo','admin\LogoController@index');
Route::get('admin/set','admin\LogoController@set');
//后台商品列表路由=======================================
Route::resource('/admin/goods','admin\GoodsController');
//后台商品分类路由===========================================
Route::resource('/admin/classone','admin\ClassoneController');
Route::get('admin/ajax','admin\ClassoneController@ajax');
Route::resource('/admin/classodd','admin\ClassoddController');
Route::get('admin/ajaxodd','admin\ClassoddController@ajax');
Route::resource('/admin/classeven','admin\ClassevenController');
Route::get('admin/ajaxeven','admin\ClassevenController@ajax');
//后台商品版本价格管理路由====================================
Route::resource('/admin/goodsdet','admin\GoodsdetController');
//后台商品图片详情管理路由====================================
Route::resource('/admin/goodspic','admin\GoodspicController');
//后台问题反馈路由==========================================
Route::resource('/admin/issue','admin\IssueController');
// Route::get('/admin/issuemake','admin\MakeController@index');
Route::resource('/admin/issuemake','admin\MakeController');
//后台购物车页面===================================
Route::resource('/admin/picscroll','admin\PicscrollController');
Route::resource('/admin/car','admin\CarController');
// //后台我的足迹
Route::resource('admin/foot', 'admin\FootController');
//后台订单
Route::resource('/admin/order','admin\OrderController');
Route::resource('/admin/orders','admin\OrdersController');
Route::resource('/admin/txdd','admin\TxddController');
//后台订单路由======================================
Route::resource('/admin/order','admin\OrderController');
// 后台miui路由
Route::resource("/admin/miui","admin\MiuiController");
// 后台米聊路由
Route::resource("/admin/miliao","admin\MiliaoController");
//后台小米移动版路由
Route::resource("/admin/yidong","admin\YidongController");

//后台云服务=======================================
Route::resource('/admin/cloud','admin\CloudController');
Route::get('/admin',function(){
	return view('admin\index');
});
//后台用户路由===================================
Route::group(['prefix' => 'admin'], function(){
    //Route::get('user',"admin\UserController@index");
    Route::resource("user","admin\UserController"); 
    //后台管理员路由===================================
    Route::resource("admins","admin\AdminController"); 
});
//后台登录路由=====================================
Route::get("admin/login","admin\LoginController@index");
Route::post('admin/login','admin\LoginController@dologin');
Route::group(["prefix" => "admin","middleware"=>"checkUser"],function(){
	//Route::get("login","admin\LoginController@index");
	//Route::post('login','admin\LoginController@dologin');
	Route::get("outlogin","admin\LoginController@outlogin");
	Route::resource("/","admin\IndexController");
});
//后台友情链接
Route::resource("admin/links","admin\LinksController");
//后台用户评论
Route::resource("admin/comment","admin\CommentController");
//后台回复
Route::post("admin/reply","admin\ReplyController@index");
Route::resource("admin/hf","admin\HfController");
